package com.ruoyi.shortplay.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.shortplay.domain.ShortPlayAll;
import com.ruoyi.shortplay.mapper.ShortPlayAllMapper;
import com.ruoyi.shortplay.service.IShortPlayAllService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 木枕溪现有微短剧Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-15
 */
@Service
public class ShortPlayAllServiceImpl implements IShortPlayAllService
{
    @Autowired
    private ShortPlayAllMapper shortPlayAllMapper;

    /**
     * 查询木枕溪现有微短剧
     * 
     * @param id 木枕溪现有微短剧主键
     * @return 木枕溪现有微短剧
     */
    @Override
    public ShortPlayAll selectShortPlayAllById(Long id)
    {
        return shortPlayAllMapper.selectShortPlayAllById(id);
    }

    /**
     * 查询木枕溪现有微短剧列表
     * 
     * @param shortPlayAll 木枕溪现有微短剧
     * @return 木枕溪现有微短剧
     */
    @Override
    public List<ShortPlayAll> selectShortPlayAllList(ShortPlayAll shortPlayAll)
    {
        return shortPlayAllMapper.selectShortPlayAllList(shortPlayAll);
    }

    /**
     * 新增木枕溪现有微短剧
     * 
     * @param shortPlayAll 木枕溪现有微短剧
     * @return 结果
     */
    @Override
    public int insertShortPlayAll(ShortPlayAll shortPlayAll)
    {
        shortPlayAll.setCreateTime(DateUtils.getNowDate());
        return shortPlayAllMapper.insertShortPlayAll(shortPlayAll);
    }

    /**
     * 修改木枕溪现有微短剧
     * 
     * @param shortPlayAll 木枕溪现有微短剧
     * @return 结果
     */
    @Override
    public int updateShortPlayAll(ShortPlayAll shortPlayAll)
    {
        return shortPlayAllMapper.updateShortPlayAll(shortPlayAll);
    }

    /**
     * 批量删除木枕溪现有微短剧
     * 
     * @param ids 需要删除的木枕溪现有微短剧主键
     * @return 结果
     */
    @Override
    public int deleteShortPlayAllByIds(Long[] ids)
    {
        return shortPlayAllMapper.deleteShortPlayAllByIds(ids);
    }

    /**
     * 删除木枕溪现有微短剧信息
     * 
     * @param id 木枕溪现有微短剧主键
     * @return 结果
     */
    @Override
    public int deleteShortPlayAllById(Long id)
    {
        return shortPlayAllMapper.deleteShortPlayAllById(id);
    }

    @Override
    public List<ShortPlayAll> selectShortPlayAllCopyRight(ShortPlayAll shortPlayAll) {
        return shortPlayAllMapper.selectShortPlayAllCopyRight(shortPlayAll);
    }
}
